package com.sheep.boot.config;

import com.sheep.boot.model.Test;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;

/**
 * @author wangze
 * @date 2021-04-04 20:54.
 **/
@Configuration(proxyBeanMethods =false)
@ConditionalOnProperty(
		prefix = "spring.aop",
		name = {"auto"},
		havingValue = "true",
		matchIfMissing = true
)
public class MyConfig {


//	@Value("${spring.aop.auto}")
//	private  String v1;

	@Bean("mytest")
	public Test getTest(){
		System.out.println("================================");
//		System.out.println(v1);
		return  new Test();
	}
}
